{% extends "forum/manage/main.html" %}
{% load widthtruncate %}
{% block configures %}
<div id="manage_message_list_main">
    <div id="manage_message_list_head">
        <span id="manage_message_list_title">
            提示信息管理
        </span>
        <a id="manage_message_list_addlink" href="{% url 'message_manage' action="create" id="" %}">新增提示信息</a>
    </div>
    {% spaceless %}
    <div id="manage_message_list_content">
        <div class="manage_message_list_tr manage_message_list_th">
            <div class="manage_message_list_id">
                编号
            </div>
            <div class="manage_message_list_name">
                提示代号
            </div>
            <div class="manage_message_list_detail">
                具体内容
            </div>
            <div class="manage_message_list_operate">
                相关操作
            </div>
        </div>
        {% for message in messages %}
        <div class="manage_message_list_tr {% cycle "manage_message_list_bga" "manage_message_list_bgb" %}">
            <div class="manage_message_list_id">{{ message.id }}</div>
            <div class="manage_message_list_name">{{ message.name }}</div>
            <div class="manage_message_list_detail">{{ message.content|widthtruncate:30 }}</div>
            <div class="manage_message_list_operate">
                <a class="manage_message_list_editlink" href="{% url "message_manage" action="update" id=message.id %}">修改</a>|<a class="manage_message_list_dellink" href="{% url "message_manage" action="del" id=message.id %}">删除</a>
            </div>
        </div>
        {% endfor %}
    </div>
    {% endspaceless %}
</div>
{% endblock configures %}
